<?php
include_once("../globalno.php");
header("Content-type: text/html;charset=GB2312");


$sql = "select  tuanno from dordermsg   where 1=1";

if(!empty($_REQUEST[tuanno]))  $sql.=" and tuanno='".$_REQUEST[tuanno]."'";
//if(!empty($_REQUEST[ot_code])) $sql.=" and ot_code='".$_REQUEST[ot_code]."'";

$sql.=" limit 1";

$tnarr=$db->get_sql_row($sql);

if(!empty($_REQUEST[ot_code])){
if($_REQUEST[ot_code]==1){
	echo"2";
}else{
if(!empty($tnarr[tuanno])){
	echo"1";
}else{
	echo"2";
}	
}
}else{
	
	echo"2";
}
?>